home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / esc.jar / com / extensibility / xml / DTDMLWriter$NotationProxy.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-30  |  2.3 KB  |  56 lines

  1. package com.extensibility.xml;
  2.  
  3. import java.io.StringWriter;
  4.  
  5. public class DTDMLWriter$NotationProxy extends DTDMLWriter.DeclProxy {
  6.    // $FF: synthetic field
  7.    final DTDMLWriter this$0;
  8.    NotationDeclaration decl;
  9.  
  10.    DTDMLWriter$NotationProxy(DTDMLWriter var1) {
  11.       super((DTDMLWriter)null);
  12.       this.this$0 = var1;
  13.    }
  14.  
  15.    DTDMLWriter$NotationProxy(DTDMLWriter var1, NotationDeclaration var2) {
  16.       super((DTDMLWriter)null);
  17.       this.this$0 = var1;
  18.       this.setDecl(var2);
  19.    }
  20.  
  21.    void setDecl(NotationDeclaration var1) {
  22.       this.decl = var1;
  23.       super.setDecl(var1);
  24.    }
  25.  
  26.    public void write(SXE var1, boolean var2) {
  27.       var1.writeElem("Notation");
  28.       var1.writeAttr("Name", this.decl.getName());
  29.       if (this.decl.getSystemID() != null) {
  30.          var1.writeAttr("SystemLiteral", this.this$0.schema.expandPERefs(this.decl.getSystemID().toSource(), this.decl));
  31.       }
  32.  
  33.       if (this.decl.getPublicID() != null) {
  34.          var1.writeAttr("PublicLiteral", this.this$0.schema.expandPERefs(this.decl.getPublicID(), this.decl));
  35.       }
  36.  
  37.       var1.writeElem("dtdsource", -1);
  38.       var1.writeRawText("<![CDATA[\r\n");
  39.  
  40.       try {
  41.          StringWriter var3 = new StringWriter();
  42.          this.decl.write(var3);
  43.          String var4 = this.this$0.makeHTMLFriendly(var3.toString());
  44.          var1.writeRawText(var4);
  45.       } catch (Exception var5) {
  46.       }
  47.  
  48.       var1.writeRawText("]]>\r\n");
  49.       var1.flush("dtdsource");
  50.       if (var2) {
  51.          ((DTDMLWriter.DeclProxy)this).writeComments(var1);
  52.       }
  53.  
  54.    }
  55. }
  56.